package com.qian.ddj.web.controller;

import com.qian.api.ddj.model.PhoneCheckCode;
import com.qian.api.ddj.service.IPhoneCheckCodeService;
import com.yaowk.api.common.PageReq;
import com.yaowk.api.common.PageResp;
import jdk.nashorn.internal.objects.annotations.Getter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/ddj/phoneCheckCode")
public class PhoneCheckCodeController {
    @Autowired
    private IPhoneCheckCodeService phoneCheckCodeService;

    @PostMapping("/save")
    public void save(PhoneCheckCode phoneCheckCode) {
        phoneCheckCodeService.save(phoneCheckCode);
    }

    @GetMapping("/all")
    public PageResp<PhoneCheckCode> findAll(PageReq pageReq){
        PageResp<PhoneCheckCode> pageResp = phoneCheckCodeService.findAll(pageReq);
        return pageResp;
    }
}
